.class public Lcom/nemustech/regina/ReginaAppWidgetHost;
.super Landroid/appwidget/AppWidgetHost;
.source "ReginaAppWidgetHost.java"


# instance fields
.field final mViews:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Integer;",
            "Landroid/appwidget/AppWidgetHostView;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;I)V
    .locals 1
    .parameter "context"
    .parameter "hostId"

    .prologue
    .line 39
    invoke-direct {p0, p1, p2}, Landroid/appwidget/AppWidgetHost;-><init>(Landroid/content/Context;I)V

    .line 35
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/nemustech/regina/ReginaAppWidgetHost;->mViews:Ljava/util/HashMap;

    .line 40
    return-void
.end method


# virtual methods
.method public deleteAppWidgetId(I)V
    .locals 3
    .parameter "appWidgetId"

    .prologue
    .line 53
    invoke-super {p0, p1}, Landroid/appwidget/AppWidgetHost;->deleteAppWidgetId(I)V

    .line 54
    iget-object v0, p0, Lcom/nemustech/regina/ReginaAppWidgetHost;->mViews:Ljava/util/HashMap;

    monitor-enter v0

    .line 55
    :try_start_0
    iget-object v1, p0, Lcom/nemustech/regina/ReginaAppWidgetHost;->mViews:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 56
    monitor-exit v0

    .line 57
    return-void

    .line 56
    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method protected onCreateView(Landroid/content/Context;ILandroid/appwidget/AppWidgetProviderInfo;)Landroid/appwidget/AppWidgetHostView;
    .locals 4
    .parameter "context"
    .parameter "appWidgetId"
    .parameter "appWidget"

    .prologue
    .line 45
    new-instance v0, Lcom/nemustech/regina/ReginaAppWidgetHostView;

    invoke-direct {v0, p1}, Lcom/nemustech/regina/ReginaAppWidgetHostView;-><init>(Landroid/content/Context;)V

    .line 46
    .local v0, view:Landroid/appwidget/AppWidgetHostView;
    iget-object v1, p0, Lcom/nemustech/regina/ReginaAppWidgetHost;->mViews:Ljava/util/HashMap;

    monitor-enter v1

    .line 47
    :try_start_0
    iget-object v2, p0, Lcom/nemustech/regina/ReginaAppWidgetHost;->mViews:Ljava/util/HashMap;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v2, v3, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 48
    monitor-exit v1

    .line 49
    return-object v0

    .line 48
    :catchall_0
    move-exception v2

    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v2
.end method

.method updateAppWidgetView(ILandroid/widget/RemoteViews;)V
    .locals 4
    .parameter "appWidgetId"
    .parameter "views"

    .prologue
    .line 61
    iget-object v1, p0, Lcom/nemustech/regina/ReginaAppWidgetHost;->mViews:Ljava/util/HashMap;

    monitor-enter v1

    .line 62
    :try_start_0
    iget-object v2, p0, Lcom/nemustech/regina/ReginaAppWidgetHost;->mViews:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/appwidget/AppWidgetHostView;

    .line 63
    .local v0, v:Landroid/appwidget/AppWidgetHostView;
    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 64
    if-eqz v0, :cond_0

    .line 65
    invoke-virtual {v0, p2}, Landroid/appwidget/AppWidgetHostView;->updateAppWidget(Landroid/widget/RemoteViews;)V

    .line 67
    :cond_0
    return-void

    .line 63
    .end local v0           #v:Landroid/appwidget/AppWidgetHostView;
    :catchall_0
    move-exception v2

    :try_start_1
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v2
.end method
